<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Django开发博客项目</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
    <div class="container page-header">
        <h1>Django开发博客项目 <small>By Actoress</small></h1>
    </div>
    <div class="container page-body">
        <div class="col-md-9" role="main">
            <div class="body-main">
                {% for aritle in article_list %}
                <div>
                    <h2><a href="/blog/detail/{{aritle.article_id}}">{{ aritle.title }}</a></h2>
                    <p>{{ aritle.brief_content }}</p>
                </div>
                {% endfor %}
            </div>
            <div>
                <nav aria-label="Page navigation">
                  <ul class="pagination">
                    <li>
                      <a href="/blog/index?page={{prev_page}}" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                      </a>
                    </li>
                    {% for num in page_num %}
                        <li><a href="/blog/index?page={{num}}">{{num}}</a></li>
                    {% endfor %}
                    <li>
                      <a href="/blog/index?page={{next_page}}" aria-label="Next">
                        <span aria-hidden="true">&raquo;</span>
                      </a>
                    </li>
                  </ul>
                </nav>
            </div>
        </div>
        <div class="col-md-3" role="complementary">
            <div>
                <h2>最新文章</h2>
                {% for aritle in top5_article_list %}
                <h4><a href="/blog/detail/{{aritle.article_id}}">{{ aritle.title }}</a></h4>
                {% endfor %}
            </div>
        </div>
    </div>
</body>
</html>